package com.jeecg.demo.api;

import java.util.List;
import java.util.Map;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.jeecgframework.jwt.util.ResponseMessage;
import org.jeecgframework.jwt.util.Result;
import org.jeecgframework.web.system.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 名企推荐
 * @author Administrator
 *
 */
@Api(value = "VShopsEntity", description = "名企", tags = "VShopsEntity")
@Controller
@RequestMapping("/shops")
public class ShopLogo {
	@Autowired
	private SystemService systemService;
	@RequestMapping(value = "/supplyTodemand", method = RequestMethod.GET)
	@ResponseBody
	@ApiOperation(value = "名企推荐", produces = "application/json")
	public ResponseMessage<List<Map<String, Object>>> shoplist() {
		String sql = "select v.*,t.* from V_ECP_SHOPS v left join APP_HOME_SHOP t on v.shopid=t.shop_id where t.home_shop_id is not null  order by  t.shop_order,t.home_shop_id desc";
		List<Map<String, Object>> listMap = systemService.findForJdbc(sql);
		return Result.success(listMap);
	}
}
